home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 10 - 1994 / 10.10 Oct 94 / Sprocket / AppSpecific / PreferencesDialogWindow.cp < prev    next >
Encoding:
Text File  |  1994-08-25  |  940 b   |  44 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        PreferencesDialogWindow.cp
  3.  
  4.     Contains:    A simple dialog window recipe
  5.                 
  6.     Written by: Dave Falkenburg
  7.     
  8.     Copyright:    © 1993-94 by Dave Falkenburg, all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.      
  12.  */
  13.  
  14. #include "PreferencesDialogWindow.h"
  15. #include <Controls.h>
  16.  
  17. TPreferencesDialogWindow::TPreferencesDialogWindow() : TDialogWindow(kPreferencesDialogTemplateID)
  18.     {
  19.     //    Because TDialogWindow::TDialogWindow has already created the dialog,
  20.     //    this is a great place to grab settings & setup the contents of the
  21.     //    dialog.
  22.     //
  23.     //    Of course, if you do this you probably want to mark the DLOG
  24.     //    as not initially visible, then call ShowWindow just before returning.
  25.     //
  26.     //    You should also setup UPPs for any user items in here, too. 
  27.     }
  28.  
  29. void
  30. TPreferencesDialogWindow::ItemHit(short theItem)
  31.     {
  32.     switch (theItem)
  33.         {
  34.         case    ok:
  35.         case    cancel:
  36.             this->Close();
  37.             delete this;
  38.             break;
  39.             
  40.         default:
  41.             break;
  42.         }
  43.     }
  44.